Skip to content

#274 - CI: test the lowest dependencies, fix the lower bounds of psr/log and monolog/monolog - #287

Merged
njoubert-cleverage merged 1 commit into
mainfrom
274
Oct 14, 2026
Merged

njoubert-cleverage merged 1 commit into
mainfrom
274

Conversation

@njoubert-cleverage

@njoubert-cleverage njoubert-cleverage commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Description

Fixes #274: add a CI job testing the lowest versions allowed by composer.json, and fix the lower bounds it revealed.

Changes

  • .github/workflows/test.yml: new matrix entry, PHP 8.2 (lowest supported) with dependencies: lowest (ramsey/composer-install runs composer update --prefer-lowest --prefer-stable).
  • psr/log ^2|^3 (not required until now, resolved to a 1.x version through the Symfony components, which allow ^1|^2|^3): Logger\AbstractLogger (ProcessLogger, TaskLogger) and the test loggers declare log($level, string|\Stringable $message, array $context = []): void, incompatible with psr/log 1:
    Fatal error: Declaration of Psr\Log\AbstractLogger@anonymous::log($level, Stringable|string $message, array $context = []): void must be compatible with Psr\Log\LoggerInterface::log($level, $message, array $context = [])
    
  • monolog/monolog ^3 (not required until now, resolved to 2.3.3 through symfony/monolog-bundle 3.11): the Logger\*Processor classes type Monolog\LogRecord, a Monolog 3 class. With Monolog 2, MonologBundle would call them with an array record: TypeError on every log of the cleverage_process* channels. Not visible in the tests (no test runs a processor through Monolog); checked that Monolog\LogRecord does not exist with the lowest set.
  • CHANGELOG (Latest).

Related: #269 (optional MonologBundle) will have to keep the monolog/monolog ^3 constraint, as a requirement or as a conflict: "monolog/monolog": "<3", if the processors stay registered.

Checks

  • Locally, PHP 8.2 + composer update --prefer-lowest --prefer-stable (Symfony 6.4.0, psr/log 2.0.0, monolog/monolog 3.0.0, psr/container 1.1.0, PHPUnit 11.5): 906 tests OK. Before the fix: fatal error above.
  • PHP 8.5 + composer update: 906 tests OK, PHPStan OK, composer validate --strict OK.

Requirements

  • Documentation updates
    • Reference
    • Cookbooks
    • Changelog
  • Unit tests

Breaking changes

None in practice: the removed versions (psr/log 1, monolog/monolog 2) could not work with the bundle (fatal error / TypeError).

🤖 Generated with Claude Code

…log and monolog/monolog

- New CI job: PHP 8.2 with dependency-versions: lowest
  (composer update --prefer-lowest --prefer-stable).
- psr/log ^2|^3: Logger\AbstractLogger (and the test loggers) implement the
  typed LoggerInterface signatures, a fatal error with psr/log 1, which was
  allowed through the Symfony components.
- monolog/monolog ^3: the Logger\*Processor classes use Monolog\LogRecord
  (Monolog 3 only); with Monolog 2 (allowed by symfony/monolog-bundle 3.11),
  every log of the cleverage_process* channels would fail with a TypeError.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@njoubert-cleverage
njoubert-cleverage merged commit 457df75 into main Oct 14, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: test the lowest dependencies

1 participant